package com.wnxy.pms.order.core.mapper;

import com.wnxy.pms.order.core.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author Jet
 * @since 2022-06-09
 */
public interface OrderMapper extends BaseMapper<Order> {
    @Update("update pms_order set status = #{status} where order_sn = #{orderSn}")
    int updateByOrderSn(@Param("orderSn")String orderSn, @Param("status")Integer status);

    @Select("select * from pms_order where order_sn = #{value}")
    Order selectByOrderSn(String orderSn);
}
